package com.breakfast.fun.data.entity.user.address;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by yukai on 16/9/15.
 */
public class RoadData {

    /**
     * id : 6014
     * accountId : 5407
     * mobile : 18359928629
     * consignee : 余凯
     * provinceId : 0
     * cityId : 1
     * cityName : 福州市
     * areaId : 12
     * areaName : 台江区-金融街万达
     * builderId : 276
     * builderName : 奥迪原动力4S店
     * detail : 的
     * address : 奥迪原动力4S店-的
     * phone : 18359928629
     * isDefault : n
     * floorNo : 3楼
     * addTime : 2016-09-15 12:50:55
     */

    private int id;
    private int accountId;
    private String mobile;
    private String consignee;
    private int provinceId;
    private int cityId;
    private String cityName;
    private int areaId;
    private String areaName;
    private int builderId;
    private String builderName;
    private String detail;
    private String address;
    private String phone;
    private String isDefault;
    private String floorNo;
    private String addTime;

    public static RoadData objectFromData(String str) {

        return new Gson().fromJson(str, RoadData.class);
    }

    public static List<RoadData> arrayRoadDataFromData(String str) {

        Type listType = new TypeToken<ArrayList<RoadData>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getAccountId() {
        return accountId;
    }

    public void setAccountId(int accountId) {
        this.accountId = accountId;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getConsignee() {
        return consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee;
    }

    public int getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(int provinceId) {
        this.provinceId = provinceId;
    }

    public int getCityId() {
        return cityId;
    }

    public void setCityId(int cityId) {
        this.cityId = cityId;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public int getAreaId() {
        return areaId;
    }

    public void setAreaId(int areaId) {
        this.areaId = areaId;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public int getBuilderId() {
        return builderId;
    }

    public void setBuilderId(int builderId) {
        this.builderId = builderId;
    }

    public String getBuilderName() {
        return builderName;
    }

    public void setBuilderName(String builderName) {
        this.builderName = builderName;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(String isDefault) {
        this.isDefault = isDefault;
    }

    public String getFloorNo() {
        return floorNo;
    }

    public void setFloorNo(String floorNo) {
        this.floorNo = floorNo;
    }

    public String getAddTime() {
        return addTime;
    }

    public void setAddTime(String addTime) {
        this.addTime = addTime;
    }
}
